*******		REPLICATION FILES: README
*******		Climate Variability and Irregular Migration to the European Union 
*******		Global Environmental Change 
*******		Fabien Cottier (Columbia University) and Idean Salehyan (University of North Texas)
*******		This version: April 2021

Corresponding author: Fabien Cottier (fabien.cottier@gmail.com)


This folder contains the replication files for the article titled "Climate Variability and Irregular Migration to the European Union",
published in the journal of Global Environmental Change (authors: Fabien Cottier and Idean Salehyan). 
With the exception of a handful of plotting scripts using R, all the files listed below are written with Stata (version 14.2).

The folder [scripts] contains the Stata scripts necessary to reproduce the figures shown in the online appendix (Fig. A.3-A.30). 
The folder [shp] contains the country GIS shapefiles required to replicate Figure 2. 
The source of these shapefiles is the cshapes dataset (Weidman et al. 2010).

Make sure to change the working directory to your own, before running the scripts.


To run the Stata do files, the following ssc packages are required:
- coefplot (http://repec.sowi.unibe.ch/stata/coefplot) (Jann 2014)
- crossfold (https://www.benjaminbdaniels.com/stata-code/crossfold/) (Benjamin Daniels n.d.)
- plottig (https://danbischof.com/2015/05/15/and-another-stata-figure-scheme-plottig/) (Bischof 2017)
- estout (http://repec.org/bocode/e/estout/esttab.html) (Jann 2007)
- spatial HAC errors // ols_spatial_HAC (http://www.globalpolicy.science/code) (Hsiang 2010)


List of replication files

[Main text]
[Stata] replication_maintext.do: replicates tables and statistical results discussed in the main text
[R] replication_Fig1.R: replicates Fig 1.
[R] replication_Fig2.R: replicates Fig 2
[Stata] replication_Fig3.do: replicates Fig 3.
[Stata] replication_Fig4.do: replicates Fig 4.

[Online appendix]
[R] replication_appendixA1.R: replicates tables and figures shown in Section A.1.
[Stata] replication_appendixA2.do: replicates tables and figures shown in Section A.2
[Stata] replication_appendixA3.do: replicates tables and figures shown in Section A.2
[Stata] replication_appendixS1.do: sensitivity analyses 1 (growing season SPEI)
[Stata] replication_appendixS2.do: sensitivity analyses 2 (rate variable for migration)
[Stata] replication_appendixS3.do: sensitivity analyses 3 (Quasi-poisson)
[Stata] replication_appendixS4.do: sensitivity analyses 4 (quarterly SPEI indicators)
[Stata] replication_appendixS5.do: sensitivity analyses 5 (annual migration data)
[Stata] replication_appendixS6.do: sensitivity analyses 6 (all countries)
[Stata] replication_appendixS7.do: sensitivity analyses 7 (no lag migration variables)
[Stata] replication_appendixS8.do: sensitivity analyses 8 (no-population weighted SPEI)
[Stata] replication_appendixS9.do: sensitivity analyses 9 (Temperature and precipitation anomalies)
[Stata] replication_appendixS10.do: sensitivity analyses 10 (splitting sample based on GDP per capita)
[Stata] replication_appendixS11.do: sensitivity analyses 11 (splitting sample based on geographical location)
[Stata] replication_appendixS12.do: sensitivity analyses 12 (including Balkan migration routes)
[Stata] replication_appendixS13.do: sensitivity analyses 13 (spatial heteroscedasticity and autocorrelation consistent errors)



List of data files

[Stata] data_quarter.dta: replication dataset with quarterly resolution data
[Stata] data_annual.dta: replication dataset with annual resolution data (required for file replication_appendixS5.do)
[CSV] FrontexIBCP_2009_2017m_cntr_df.csv: Frontex migration dataset (required to replicate Figures 1-2 and appendix A.1)




References:

Bischof. D. 2017. New graphic schemes for Stata: plotplain and plottig. The Stata Journal 17(3): 748-759.

Daniels, B. n.d. Crossfold package stata. https://www.benjaminbdaniels.com/stata-code/crossfold/

Hsiang, S.M. 2010. Temperatures and Cyclones Strongly Associated with Economic Production in the Caribbean and
  Central America. Proceedings of the National Academy of sciences 107(35), 15367–15372.

Jann, B. 2007. Making regression tables simplified. The Stata Journal 7(2): 227-244. 

Jann, B. 2014. Plotting regression coefficients and other estimates. The Stata Journal 14(4): 708-737.

Weidmann, N., Kuse, D., and Gleditsch, K. S. 2010. The Geography of the International System: The CShapes Dataset. International Interactions 36(1): 86–106.